import request from '@/utils/request'

//获取当前用户菜单
export function getSelfMenus() {
    return request({
        url: '/bms/admin/sys-menu/getSelfMenus',
        method: 'get'
    })
}

//分页获取菜单列表
export function getPaginationList(params) {
    return request({
        url: '/bms/admin/sys-menu/getPaginationList',
        method: 'get',
        params: params
    })
}

//条件查询菜单列表
export function getMenuDetailVoList(params) {
    return request({
        url: '/bms/admin/sys-menu/getMenuDetailVoList',
        method: 'get',
        params: params
    })
}

//条件查询菜单列表
export function getList(params) {
    return request({
        url: '/bms/admin/sys-menu/getList',
        method: 'get',
        params: params
    })
}

//新增菜单
export function add(data) {
    return request({
        url: '/bms/admin/sys-menu/add',
        method: 'post',
        data
    })
}

// 删除
export function del(id) {
    return request({
        url: '/bms/admin/sys-menu/del',
        method: 'delete',
        params: { id }
    })
}

//跟新菜单
export function update(data) {
    return request({
        url: '/bms/admin/sys-menu/update',
        method: 'post',
        data
    })
}

//id获取菜单详情
export function getDetails(id) {
    return request({
        url: '/bms/admin/sys-menu/getDetails',
        method: 'get',
        params: { id }
    })
}

